package com.yupi.yupicturebackend.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yupi.yupicturebackend.model.dto.user.UserAddRequest;
import com.yupi.yupicturebackend.model.dto.user.UserQueryRequest;
import com.yupi.yupicturebackend.model.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.yupicturebackend.model.vo.LoginUserVo;
import com.yupi.yupicturebackend.model.vo.UserVo;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author MK
 * @description 针对表【user(用户)】的数据库操作Service
 * @createDate 2024-12-13 15:33:33
 */
public interface UserService extends IService<User> {

    LoginUserVo addUser(UserAddRequest addUserRequest);


    long userRegister(String userAccount, String userPassword, String checkPassword);

    LoginUserVo login(String userAccount, String userPassword, HttpServletRequest request);

    String getEncryptPassword(String userPassword);

    LoginUserVo getLoginUserVo(User user);

    User getLoginUser(HttpServletRequest request);

    long logout(HttpServletRequest request);

    UserVo getUserVO(User user);

    List<UserVo> getUserVOList(List<User> records);

    QueryWrapper<User> getQueryWrapper(UserQueryRequest userQueryRequest);

    boolean isAdmin(Long loginUserId);

}

